import Vue from 'vue'
import VueRouter from 'vue-router'
import Index from '../views/index.vue'

Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        redirect: '/homemngindex'
    },
    {
        path: '/',
        name: 'Index',
        component: Index,
        children: [
            {
                path: '/homemngindex',
                name: 'HomeMngIndex',
                component: () => import('../views/home-mng/index.vue'),
                children: [
                    {
                        path: '/homemngindex/homemyroom',
                        name: 'HomeMyRoom',
                        component: () => import('../views/home-mng/home-my-room/index.vue')
                    }
                ]
            }
        ]
    }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
